<template>
    <el-input class="textarea" type="textarea" :autosize="{ minRows: 2}" :placeholder="placeholder" @input="updateValue" :value="value" :disabled="!editable"></el-input>
</template>
<script>
import { exportWidthInfo } from "../../utils";
export default {
	name: "v-textarea",
	props: {
		value: String,
		options: {
			type: Object,
			required: true
		},
		editable: Boolean
	},
	data() {
		return {
			placeholder: this.options.placeholder,
			autosize: {
				minRows: 2
			}
		};
	},
	methods: {
		updateValue(val) {
			this.$emit("input", val);
		}
	},
	created() {
		this.$emit(
			"dispatch-width",
			exportWidthInfo(this.options.display, 250)
		);
	}
};
</script>
<style>
	.el-textarea__inner{
		font-family:Arial
	}
</style>

